<?php
require('config.php');

        $user_id=$_REQUEST['user_id'];
        //$user_id=54;
        //$orderId=124;
		$sql="select * from `".$oto."_orders` as o,`".$oto."_order_goods` as g,`".$oto."_shops` as s where o.userId='".$user_id."' and `orderFlag`='1' and o.orderId=g.orderId and s.shopId=o.shopId and  orderStatus in ('-6','-7','-4','-3','-8') order by o.createTime DESC";
		//echo $sql;
		//die();
		$result=$db->query($sql);
		while($row=$result->fetch_assoc()){
			$person_info[]=$row;//将取得的所有数据赋值给person_info数组
		}
		echo json_encode($person_info);
?>